home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / hill.g < prev    next >
Text File  |  1995-05-04  |  2KB  |  112 lines

  1. (game-module "hill"
  2.   (title "King of the Hill")
  3.   (blurb "Be 10 years old again!")
  4. )
  5.  
  6. (set see-all true)
  7.  
  8. (unit-type kid (image-name "person") (help "a participant"))
  9.  
  10. (terrain-type grass (char "+") (color "green"))
  11. (terrain-type hill (char "^") (color "sienna"))
  12.  
  13. (add kid acp-per-turn 2)
  14.  
  15. (table mp-to-enter-terrain (kid hill 2))
  16.  
  17. (add kid hp-max 99)
  18.  
  19. ;; The parameters here simulate kids shoving each other.
  20.  
  21. ;false counterattack
  22.  
  23. ;false kid can-counter
  24.  
  25. (table withdraw-chance-per-attack
  26.   (kid kid 50)
  27.   )
  28.  
  29. (table hit-chance (kid kid 90))
  30.  
  31. (table damage (kid kid 1))
  32.  
  33. ;; Harder to get at a kid that's on the hill.
  34.  
  35. (table defend-terrain-effect
  36.   (kid hill 70)
  37.   )
  38.  
  39. ;80 kid retreat
  40.  
  41. ;; Get any hp losses back always.
  42.  
  43. (add kid hp-recovery 99.00)
  44.  
  45. (set action-messages '(
  46.   (attack done "%actor shoves %u1!")
  47.   ))
  48.  
  49. ;(set action-special-effects '(
  50. ;  (attack done (defender "oof"))
  51. ;  )
  52.  
  53. (game-module (notes 
  54.   "This period `implements' 10-year-old kids.  They can hit each other,"
  55.   "but damage is very minor, and soon recovered from.  The most likely result"
  56.   "is for one or both to run away."
  57. ))
  58.  
  59. (area 30 21 (terrain
  60.   "30a"
  61.   "30a"
  62.   "30a"
  63.   "30a"
  64.   "30a"
  65.   "30a"
  66.   "30a"
  67.   "30a"
  68.   "30a"
  69.   "30a"
  70.   "15ab14a"
  71.   "30a"
  72.   "30a"
  73.   "30a"
  74.   "30a"
  75.   "30a"
  76.   "30a"
  77.   "30a"
  78.   "30a"
  79.   "30a"
  80.   "30a"
  81. ))
  82.  
  83. (side 1 (name "Garbage Pail Kids"))
  84.  
  85. (side 2 (name "Deadend Kids"))
  86.  
  87. (kid (n "Tommy") (@ 7 10) (s 1))
  88. (kid (n "Jenny") (@ 7 9) (s 1))
  89. (kid (n "Stanley") (@ 7 11) (s 1))
  90. (kid (n "Barry") (@ 6 10) (s 1))
  91. (kid (n "Charlie") (@ 8 10) (s 1))
  92. (kid (n "Mikey") (@ 6 11) (s 1))
  93. (kid (n "Marty") (@ 8 9) (s 1))
  94. (kid (n "Cathy") (@ 9 10) (s 1))
  95. (kid (n "Joey") (@ 23 10) (s 2))
  96. (kid (n "Leslie") (@ 24 9) (s 2))
  97. (kid (n "Timmy") (@ 22 11) (s 2))
  98. (kid (n "Harry") (@ 24 10) (s 2))
  99. (kid (n "Bobby") (@ 22 10) (s 2))
  100. (kid (n "Julie") (@ 23 11) (s 2))
  101. (kid (n "Jimmy") (@ 23 9) (s 2))
  102. (kid (n "Patti") (@ 21 10) (s 2))
  103.  
  104. ;;; The scorekeeper (should) gives the win to the occupier of the hill after
  105. ;;; some number of turns has passed.
  106.  
  107. #|
  108. Globals 0 50 0 0 1 0
  109. 1 3 30 40 -1
  110. 15 10 -1
  111. |#
  112.